module Page5.View exposing (..)
import Page5.Model as M
import Html as H
import Html.Attributes as A

type Msg =
  NoOp

view: M.Model -> H.Html Msg
view model =
  H.div 
    [ A.id "page5"
    , A.class "page" 
    , A.class "slide"]
    [ H.div [] [H.text (.title model) ]
    , H.ul 
        [] 
        (List.map item (.items model))]

item: M.Item -> H.Html Msg
item i =
  H.li
    []
    [ H.div [] [H.text (.name i)]
    , H.div [] [H.text (.desc i)]
    , H.div 
        []
        (List.map url (.urls i))]

url: M.Url -> H.Html Msg
url u =
  H.div
    []
    [ H.div [] [H.text (.title u)] 
    , H.div [] [H.text (.url u)] 
    ]